/**
 * @author ：wang-ting
 * @Date：2025/3/3 15:26
 */
public class 数据类型 {
    public static void main(String[] args) {
        /*
        数据类型的使用(整型，短整型，长整型，字节型，浮点型，双精度浮点型，字符型，布尔型）
         */
        int k = 10;
        int g = -100;
        System.out.println(g);
        System.out.println(k);
        short m = 6;
        System.out.println(m);
        long x = 10086L;
        System.out.println(x);
        byte b = 127;
        System.out.println(b);
        float h = 3.14f;
        System.out.println(h);
        double d = 66.50000000;
        System.out.println(d);
        char c = 'A';
        System.out.println(c);
        boolean bool = true;
        System.out.println(bool);
    }
}



    
/*
   数据类型的转换
 */
class A {
    public static void main(String[] args) {
    //将int转为String
        //方法1
        int num = 10;
        String str1 = num + "";
        System.out.println(str1);
        //方法2
        String str2 = String.valueOf(num);
        System.out.println(str2);
    //将String转为int
        String str3 = "100";
        int num2 = Integer.parseInt(str3);
        System.out.println(num2);
    }
}